#include "stdafx.h"
#include "EssNetworkPCH.h"
#include "EssAcceptor.h"

bool EssAcceptor::listenSock(HWND wnd, UINT message)
{
	if ( WSAAsyncSelect(mSocket, wnd, message, FD_ACCEPT) == SOCKET_ERROR )
	{
		return false;
	}
	if ( ::listen(mSocket, 0) == SOCKET_ERROR )
	{
		return false;
	}
	return true;
}